package com.ts.manage.cms.controller;

import com.ts.api.manage.cms.CmsConfigControllerApi;
import com.ts.framework.domain.cms.CmsConfig;
import com.ts.manage.cms.service.CmsConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("cms/config")
public class CmsConfigController implements CmsConfigControllerApi {

    @Autowired
    CmsConfigService cmsConfigService;

    /**
     * 根据id查询配置管理信息
     * @param id
     * @return
     */
    @Override
    @GetMapping("getModel/{id}")
    public CmsConfig findCmsConfigById(@PathVariable String id) {
        return cmsConfigService.findCmsConfigById(id);
    }
}
